<template>
    <el-dialog title="重置密码" :visible="passwordChangeShow" @close="dialogClose">
        <el-form :model="ruleForm" :rules="rules" ref="passwordChange" label-width="100px">
            <el-row :gutter="24">
                <el-col :span="22">
                    <el-form-item label="密码" prop="password">
                        <el-input v-model="ruleForm.password"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>

        <span slot="footer" class="dialog-footer">
            <el-button @click="dialogClose">取 消</el-button>
            <el-button type="primary" @click="submitForm()">确 定</el-button>
        </span>


    </el-dialog>

</template>

<script>
export default {
    data() {
        return {
            ruleForm: {
                password: ''

            },
            rules: {
                password: [
                    { required: true, message: '请输入' }
                ],
            }
        }
    },
    props: {
        passwordChangeShow: {
            type: Boolean
        },
    },
    methods: {
        dialogClose() {
            this.$emit('dialogClose')
        },
        submitForm() {
            this.$refs.passwordChange.validate((valid) => {
                if (!valid) {
                    return
                }
                else {
                    this.$emit('dialogClose')
                }
            });

        },

    }
}
</script>

<style>

</style>

